package echat.future.cn.echat.my.view;

import android.content.Intent;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import echat.future.cn.echat.R;
import echat.future.cn.echat.databinding.ActivityAuthenticationZhuboBinding;
import echat.future.cn.echat.my.weight.Navagation.AdapterNavagation;
import echat.future.cn.echat.my.weight.Navagation.IBaseNavagation;

public class AuthenticationZhuboActivity extends BaseActivity<ActivityAuthenticationZhuboBinding>{

    public final static int TYPE_SUBMIT = 1;
    public final static int TYPE_PROGROSS = 2;
    public final static int TYPE_RESULT = 3;

    @Override
    public int layoutId() {
        return R.layout.activity_authentication_zhubo;
    }

    @Override
    public IBaseNavagation navagation() {
        return new AdapterNavagation(this).setTitle("认证主播",16,R.color.white).setBack(R.drawable.btn_back).setNavagationBackgroudColor(R.color.color_161823);
    }

    @Override
    public void initView() {
        bind.etInfo.setOnClickListener(v->{
            startActivity(new Intent(AuthenticationZhuboActivity.this,EditeAuthInfoActivity.class));
            finish();
        });

        int type = getIntent().getIntExtra("type",TYPE_SUBMIT);
        if(type == TYPE_PROGROSS){
            bind.etInfo.setVisibility(View.GONE);
            bind.textView8.setText("你提交的认证资料我们已收到");
            bind.textView9.setText("请加客服微信\nMs-Yni\n进行人工审核");
            bind.textView11.setVisibility(View.GONE);
        }else if(type == TYPE_RESULT){
            bind.textView8.setText("认证失败");
            bind.textView8.setTextColor(Color.parseColor("#FF0000"));
            bind.textView9.setText("失败原因：长得不够好看吧，你看不行吧，被拒绝了吧\n惊不惊喜，意不意外。");
            bind.textView11.setVisibility(View.GONE);
            bind.etInfo.setOnClickListener(v->{
                startActivity(new Intent(AuthenticationZhuboActivity.this,EditeAuthInfoActivity.class).putExtra("type",1));
                finish();
            });
            bind.etInfo.setText("修改资料");
        }

    }

}
